let f7 = null;
let popover = null;

class Popover {
  static init(app) {
    f7 = app;
  }

  static show(param, animate = true) {
    Popover.dismiss();
    popover = f7.popover.create(param).open(animate);
    // return popover;
  }

  static dismiss(animate = true) {
    let result = false;

    if (null != popover && popover.opened) {
      // popover.close(animate).destroy()
      popover.close(animate);
      popover = null;
      result = true;
    }

    return result;
  }
}

export default Popover;
